<template>
  <div id="app">
    <icon type="weixin"/>
    <Comp :current="current" :total="total" :pageData="pageData" @changePage="ChangeNum"/>
  </div>
</template>

<script>
import icon from './components/icon.vue'
import Comp from './components/Comp.vue'

export default {
  name: 'app',
  components: {
    icon,
    Comp
  },
  data(){
    return{
      current:2,
      total:202,
      pageData:10
    }
  },
  methods:{
    ChangeNum(e){
      if(e==1){
        this.current=0
      }else{
        this.current= Math.ceil(this.total/this.pageData)
      }
    }
  }
}
</script>

<style>
</style>
